import React from 'react';
import { Button } from 'antd';

class CustomButton extends React.PureComponent {
	onClick = () => {
		const { onClick } = this.props;
		if (typeof onClick === 'function') onClick();
	}
  render() {
		const { children, ...nextProps } = this.props;
    return (
			<Button {...nextProps} onClick={this.onClick}>{children}</Button>
    );
  }
}

export default CustomButton;
